﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
using LanDBom.Models;

namespace LanDBom.Models
{
    public class Get_CL
    {
        //获取客户信息
        LDbaseEntities LD = new LDbaseEntities();
        public List<Clirntele> GetCL_name()
        {
            try
            {
                List<Clirntele> areaList = LD.Clirntele.ToList();
                return areaList;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        internal object JIDN(string app_ban, string nameed)
        {
            var name = LD.Dengli.FirstOrDefault(a=>a.DE_nae==nameed);
            var id = name == null?-99: name.DE_ID;

            var shun=LD.ShejinBeiZhu.Where(s=>s.SJ_Bian==app_ban&s.SJR_id==id).FirstOrDefault();
            var jing = shun == null ? "NULL" : shun.SJ_ZT;
            return jing;
        }
    }
}